package com.atguigu.gmall.feign.order;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.order.vo.OrderConfirmVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:lyd
 * @Date:2023/9/4 18:35
 * @Version:1.0
 * @Description
 **/
@FeignClient("service-order")
@RequestMapping("/api/inner/order")
public interface OrderFeignClient {

    /**
     * 获取订单确认页的数据
     *
     * @return
     */
    @GetMapping("/order/confirm/data")
    Result<OrderConfirmVo> getOrderConfirmData();


    /**
     * 获取订单信息
     *
     * @param orderId
     * @return
     */
    @GetMapping("/orderinfo/{orderId}")
    Result<OrderInfo> getOrderInfo(@PathVariable Long orderId);
}
